﻿@using System.Xml.Xsl;
@using System.Xml.Linq;
@using System.Data;
@using System.Dynamic;
@{
    ViewBag.Title = "Список пользователей";

    //System.Xml.Linq.XElement root = Model;

    Dictionary<string, string> args = new Dictionary<string, string>();
    args.Add("acc_url", Url.Action("GetDetails", "Admin"));


        var rows = new List<dynamic>();
             
        var grid = new WebGrid(Model);
                        
               <div class="infounit">
               <h2>Пользователи</h2>
               @grid.GetHtml(
                     tableStyle: "userlist",
                     rowStyle: "odd",
                     selectedRowStyle: "cur",
                     columns: grid.Columns(
                     grid.Column("UserLogin", header:"Имя пользователя",format: @<text>@Html.ActionLink(
            (string)item.UserLogin, "UserDetails", "Admin",
            new {id=item.UserId}, null)</text>, canSort: true),
                                grid.Column("UserPass", "Пароль", canSort: false),
                                grid.Column("UserRealName", "ФИО", canSort: true),
                                grid.Column("UserDept", "Подразделение", canSort: false),
                                grid.Column("UserPos", "Должность", canSort: false),
                                grid.Column("UserAdmin", "Админ", canSort: false),
                                grid.Column("UserActive", "Активен", canSort: true)
               ))
               </div>
}
